"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

function isMobile() {
  var userAgentInfo = navigator.userAgent;
  var mobileAgents = ['Android', 'iPhone', 'SymbianOS', 'Windows Phone', 'iPad', 'iPod'];
  var mobileFlag = false; // 根据userAgent判断是否是手机

  for (var v = 0; v < mobileAgents.length; v++) {
    if (userAgentInfo.indexOf(mobileAgents[v]) > 0) {
      mobileFlag = true;
      break;
    }
  }

  var screenWidth = window.screen.width;
  var screenHeight = window.screen.height; // 根据屏幕分辨率判断是否是手机

  if (screenWidth < 500 && screenHeight < 800) {
    mobileFlag = true;
  }

  return mobileFlag;
}

var _default = isMobile;
exports.default = _default;